package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 
 * @TableName exam_paper
 */
@TableName(value ="exam_paper")
public class ExamPaper implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 试卷名称
     */
    private String papername;

    /**
     * 试卷时长
     */
    private Integer duration;

    /**
     * 合格分数
     */
    private Integer passscore;

    /**
     * 试题id集合
     */
    private String questionid;

    /**
     * 试卷分值
     */
    private Integer allscore;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 试卷名称
     */
    public String getPapername() {
        return papername;
    }

    /**
     * 试卷名称
     */
    public void setPapername(String papername) {
        this.papername = papername;
    }

    /**
     * 试卷时长
     */
    public Integer getDuration() {
        return duration;
    }

    /**
     * 试卷时长
     */
    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    /**
     * 合格分数
     */
    public Integer getPassscore() {
        return passscore;
    }

    /**
     * 合格分数
     */
    public void setPassscore(Integer passscore) {
        this.passscore = passscore;
    }

    /**
     * 试题id集合
     */
    public String getQuestionid() {
        return questionid;
    }

    /**
     * 试题id集合
     */
    public void setQuestionid(String questionid) {
        this.questionid = questionid;
    }

    /**
     * 试卷分值
     */
    public Integer getAllscore() {
        return allscore;
    }

    /**
     * 试卷分值
     */
    public void setAllscore(Integer allscore) {
        this.allscore = allscore;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExamPaper other = (ExamPaper) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPapername() == null ? other.getPapername() == null : this.getPapername().equals(other.getPapername()))
            && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration()))
            && (this.getPassscore() == null ? other.getPassscore() == null : this.getPassscore().equals(other.getPassscore()))
            && (this.getQuestionid() == null ? other.getQuestionid() == null : this.getQuestionid().equals(other.getQuestionid()))
            && (this.getAllscore() == null ? other.getAllscore() == null : this.getAllscore().equals(other.getAllscore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPapername() == null) ? 0 : getPapername().hashCode());
        result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode());
        result = prime * result + ((getPassscore() == null) ? 0 : getPassscore().hashCode());
        result = prime * result + ((getQuestionid() == null) ? 0 : getQuestionid().hashCode());
        result = prime * result + ((getAllscore() == null) ? 0 : getAllscore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", papername=").append(papername);
        sb.append(", duration=").append(duration);
        sb.append(", passscore=").append(passscore);
        sb.append(", questionid=").append(questionid);
        sb.append(", allscore=").append(allscore);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}